/**
 * 
 */
package com.dovgopoly.carlogbook.model.user;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.dovgopoly.carlogbook.model.AbstractBaseEntity;

/**
 * @author e.dovgopoliy
 * 
 */
@Entity
@Table(name = "profile")
public class Profile extends AbstractBaseEntity {

	private static final long serialVersionUID = 4902153026487105301L;

	private String name;
	private User user;

	@Column(name = "name", nullable = false, length = 64)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@ManyToOne(cascade = CascadeType.MERGE)
	@JoinColumn(name = "user_id", nullable = false)
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}
